<?php // Article List ?>
<div>
	<h2>Article List</h2>
</div>
<div style="width:100%; margin:0 auto; text-align:left; vertical-align:middle; border-bottom:dashed 1px gray;">
<?php
	$sql = "select a.* 
			from tbl_text a 
				left join ms_module b 
					on 		a.moduleid = b.moduleid 
						and b.stsrc = 'A' 
			where 	a.stsrc = 'A' 
				and b.modulename = '".$doc_name."' 
				and b.moduleid = '".$doc_id."' 
				and a.textstatus = 1 
			order by a.dateup asc, a.datein asc 
			limit 0,10
			";
	$exe = mysql_query($sql) or die(mysql_error());
	$num = mysql_num_rows($exe);
	
	
	if($num > 0)
	{
		$x1 = 1;	// get first row for style border top
		while($row = mysql_fetch_array($exe))
		{
?>
		
		<a <?php if(isset($uri_2)){if($uri_2==$row['textname']){ ?>style="color:#d1a267;"<?php }} ?> <?php if($x1 == 1){echo 'class="left_menu_href_first"';}else{echo 'class="left_menu_href"';} ?> href="<?php echo getURLdomain(); ?>/article/<?php echo stripslashes(html_entity_decode($row['textname'])); ?>" >
			<?php echo stripslashes(html_entity_decode($row['textlabel'])); ?>
		</a>
		
<?php
		$x1++;
		}
	}
?>
</div>
<div style="padding-bottom:20px;">
&nbsp;
</div>